
%!TEX program = xelatex
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[10pt]{article} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 一些常用的包总结在另一个文件里
\input{wang_preamble.tex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 选择Windows操作系统写中文文档，使用 xelatex 或 lualatex 编译器
%\usepackage{xeCJK} % 处理中文、日文和韩文（统称为 CJK 文字）的排版
%\setCJKmainfont{SimSun} % 设置正文字体为宋体
%\setCJKmonofont{SimHei} % 设置加粗字体为黑体
%\setCJKsansfont{SimHei} % 黑体

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%选择Mac操作系统写中文文档，使用 xelatex 或 lualatex 编译器
\usepackage{xeCJK} % 支持中文字体
\setCJKmainfont{Songti SC} % 设置主要中文字体，用于正文中的中文文本。设置主要中文字体为宋体
%\setCJKmonofont{Menlo} % 设置等宽中文字体，用于代码块、等宽文本等。设置等宽中文字体为 Menlo
%\setCJKsansfont{PingFang SC} % 设置无衬线中文字体，用于标题、图表标签等。设置无衬线中文字体为 PingFang SC
%\setCJKromanfont{Songti SC} % 设置罗马中文字体，用于罗马字体中的中文文本。设置罗马中文字体为宋体

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%选择输出文档的三种类型：
%\newcommand{\showsolution}{0} %%设置showsolution=0, 编译生成试卷
\newcommand{\showsolution}{1} %%设置showsolution=1, 编译生成试卷解答

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 填写课程信息：
\newcommand{\CourseName}{高等代数测验2 - 线性方程组}
\newcommand{\CourseStudents}{王立庆（2024 级数学与应用数学1班）}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%考完发给学生：

\usepackage{titling}
\setlength{\droptitle}{-2cm}   % 标题上移2cm


\ifnum\showsolution=0
\title{\CourseName }
\author{学号 \underline{\hspace{4cm}} \hspace{1cm} 姓名 \underline{\hspace{4cm}} }
\fi

\ifnum\showsolution=1
\title{\CourseName \,\, 解答 }
\author{\CourseStudents}
\fi

\renewcommand{\today}{\number\year \,年 \number\month \,月 \number\day \,日}
\date{2024年11月21日}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 考完发给学生：给文档加标题、作者、日期、摘要

\maketitle

\thispagestyle{fancy} % 第一页也显示“第几页，共几页”的信息。


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newpage 
\item %第1题
求下列向量组的极大线性无关组与秩：

$%\begin{equation*}
\left\{
\begin{aligned}
\alpha_1 &= (1,1,-1,1), \\ 
\alpha_2 &= (1,-1,0,-1), \\ 
\alpha_3 &= (1,-3,1,-3), \\ 
\alpha_4 &= (1,-3,1,1).  \\ 
\end{aligned}
\right.
$%\end{equation*}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 试卷留空位
\ifnum\showsolution=0
\vspace{3cm}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%第1题解答
\ifnum\showsolution=1

{\color{red}解答：
\begin{enumerate}[label={\arabic*.}]
\item  将这些向量按照列向量排列成一个矩阵，然后使用初等行变换，化成行最简形，
\begin{equation*}
A:=\begin{bmatrix}
1&1&1&1\\ 
1&-1&-3&-3\\ 
-1&0&1&1\\ 
1&-1&-3&1\\ 
\end{bmatrix}
\xrightarrow{\mathrm{RREF} }
\begin{bmatrix}
1&0&-1&0\\ 
0&1&2&0\\ 
0&0&0&1\\ 
0&0&0&0\\ 
\end{bmatrix} =:B.
\end{equation*}

\item  由此可以看出矩阵 $B$ 的列向量 $\beta_1,\beta_2, \beta_4$ 线性无关，且 $\beta_3=-\beta_1+2\beta_2$. 

\item  因此矩阵 $A$ 的列向量 $\{\alpha_1,\alpha_2, \alpha_4\}$ 线性无关，且 $\alpha_3=-\alpha_1+2\alpha_2$. 

\item  因此 $\{\alpha_1,\alpha_2, \alpha_4\}$ 是向量组 $\{\alpha_1,\alpha_2, \alpha_3, \alpha_4\}$ 的一个极大线性无关组。

\item  因为这个极大线性无关组包含3个向量，所以向量组 $\{\alpha_1,\alpha_2, \alpha_3, \alpha_4\}$ 的秩等于3. 

\end{enumerate}
}

%\begin{lstlisting}[language=R]
%library(pracma)
%A=matrix(sample(c(-1,0,1,2,3), 16, replace=T),nrow=4); A; rref(A)
%A=matrix(c(1,1,1,1,1,-1,-3,-3,-1,0,1,1,1,-1,-3,1),nrow=4,byrow=T); A; rref(A)
%\end{lstlisting}

\vspace{0.2cm}

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newpage 
\item %第2题
计算下述矩阵的秩：

$%\begin{equation*}
A=\begin{pmatrix}
1&1&2&1&2 \\
0&1&-1&-2&1 \\
1&2&1&-1&3 \\
2&4&2&-2&7 \\
\end{pmatrix}. 
$%\end{equation*}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 试卷留空位
\ifnum\showsolution=0
\vspace{3cm}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%第2题解答
\ifnum\showsolution=1

{\color{red}解答：
\begin{enumerate}[label={\arabic*.}]
\item  将矩阵 $A$ 通过初等行变换化为阶梯形矩阵，可得 
\begin{equation*}
A=\begin{pmatrix}
1&1&2&1&2 \\
0&1&-1&-2&1 \\
1&2&1&-1&3 \\
2&4&2&-2&7 \\
\end{pmatrix}
\xrightarrow{\mathrm{RREF} }
\begin{pmatrix}
1&0&3&3&0 \\ 
0&1&-1&-2&0 \\ 
0&0&0&0&1 \\ 
0&0&0&0&0 \\ 
\end{pmatrix} =:B. 
\end{equation*}

\item  因为阶梯形矩阵 $B$ 有三个阶梯，所以矩阵 $B$ 的秩等于3. 

\item  因为初等行变换不改变矩阵的秩，所以矩阵 $A$ 的秩也等于3. 

\end{enumerate}
}

%\begin{lstlisting}[language=R]
%library(pracma)
%A=matrix(c(1,1,2,1,2,0,1,-1,-2,1,1,2,1,-1,3,2,4,2,-2,7),nrow=4,byrow=T); A; rref(A)
%\end{lstlisting}

\vspace{0.2cm}

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newpage 
\item %第3题
讨论 $a$ 取什么值时下列方程组有唯一解、无穷多解和无解。（无需求解）

$%\begin{equation*}
\left\{
\begin{aligned}
x_1 + x_2 + x_3& = 5, \\
x_1 + ax_2 + 5x_3& = -3, \\
x_1 + 2x_2 + ax_3& = 9.  \\
\end{aligned}
\right.
$%\end{equation*}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 试卷留空位
\ifnum\showsolution=0
\vspace{5cm}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%第3题解答
\ifnum\showsolution=1

{\color{red}解答：
\begin{enumerate}[label={\arabic*.}]
\item  线性方程组有解当且仅当系数矩阵的秩等于增广矩阵的秩。

\item  将增广矩阵通过初等行变换，目标是化为阶梯形矩阵。为便于计算，先交换第2、3行，
\begin{equation*}
\begin{aligned}
\overline{A} &= 
\begin{bmatrix}
1&1&1&5 \\ 
1&a&5&-3 \\ 
1&2&a&9 \\ 
\end{bmatrix}
\xrightarrow{}
\begin{bmatrix}
1&1&1&5 \\ 
1&2&a&9 \\ 
1&a&5&-3 \\ 
\end{bmatrix}
\xrightarrow{}
\begin{bmatrix}
1&1&1&5 \\ 
0&1&a-1&4 \\ 
0&a-1&4&-8 \\ 
\end{bmatrix} \\ 
& \xrightarrow{} 
\begin{bmatrix}
1&1&1&5 \\ 
0&1&a-1&4 \\ 
0&0&-a^2+2a+3&-4a-4 \\ 
\end{bmatrix}. 
\end{aligned}
\end{equation*}

\item  未知数的个数 $n=3$. 

\item  当 $-a^2+2a+3\neq 0$, 即 $a\neq 3$ 且 $a\neq -1$ 时，$R(A)=3$, 此时有唯一解。
\item  当 $a=-1$ 时，$R(A)=2$, 而且 $R(\overline{A})=2$, 此时有无穷多解。
\item  当 $a=3$ 时，$R(A)=2$, 但是 $R(\overline{A})=3$, 此时无解。

\end{enumerate}
}

\vspace{0.2cm}

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newpage 
\item %第4题
求下列齐次线性方程组的一个基础解系，并用它表出全部解： 

$%\begin{equation*}
\left\{
\begin{aligned}
x_1 + x_2 + x_3 + x_4 &= 0, \\ 
x_1 + x_2 + 2x_3 + 3x_4 &= 0, \\ 
x_1 + x_2 + 3x_3 + 5x_4&= 0.  \\ 
\end{aligned}
\right.
$%\end{equation*}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 试卷留空位
\ifnum\showsolution=0
\vspace{6cm}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%第4题解答
\ifnum\showsolution=1

{\color{red}解答：
\begin{enumerate}[label={\arabic*.}]
\item  将系数矩阵用初等行变换化为行最简形，
\begin{equation*}
A=\begin{bmatrix}
1&1&1&1 \\ 
1&1&2&3 \\ 
1&1&3&5 \\ 
\end{bmatrix}
\xrightarrow{\mathrm{RREF} }
\begin{bmatrix}
1&1&0&-1 \\ 
0&0&1&2 \\ 
0&0&0&0 \\ 
\end{bmatrix}. 
\end{equation*}

\item  写成线性方程组，即为
\begin{equation*}
\left\{
\begin{aligned}
x_1 + x_2 - x_4 &= 0, \\ 
x_3 + 2x_4 &= 0. \\ 
\end{aligned}
\right.
\end{equation*}

\item  通解为 
\begin{equation*}
\left\{
\begin{aligned}
x_1 &= - x_2 + x_4, \\ 
x_3 &= - 2x_4, \\ 
\end{aligned}
\right.
\end{equation*}
其中 $x_2,x_4$ 为任意实数。

\item  把通解写成向量形式为
\begin{equation*}
\begin{pmatrix}  x_1 \\ x_2 \\ x_3 \\ x_4 \\   \end{pmatrix} 
=
\begin{pmatrix} -1 \\ 1 \\ 0 \\ 0 \\   \end{pmatrix} x_2
+
\begin{pmatrix} 1 \\ 0 \\ -2 \\ 1 \\   \end{pmatrix} x_4. 
\end{equation*}

\item  一个基础解系为 
\begin{equation*}
\eta_1 = \begin{pmatrix} -1 \\ 1 \\ 0 \\ 0 \\   \end{pmatrix}, 
\eta_2 = \begin{pmatrix} 1 \\ 0 \\ -2 \\ 1 \\   \end{pmatrix}. 
\end{equation*}

\item  全部解可以写成 $\{k_1\eta_1+k_2\eta_2 \mid k_1,k_2\in\mathbb{R} \}$. 

\end{enumerate}
}

\vspace{0.2cm}

\fi


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{comment}

\begin{equation*}
\begin{aligned}
& 2^{2-\log_25} + 2^{\log_23} + 2\log_3 1 - 3 \log_77 +2\ln 1 \\ 
= & \frac{2^2}{2^{\log_25}} + 3 + 2\times 0 - 3\times 1 + 2\times 0 \\ 
=& \frac{4}{5} + 3 + 0 - 3 + 0 \\ 
=& \frac{4}{5}
\end{aligned}
\end{equation*}


\begin{equation*}
\begin{aligned}
\ln e = \log_ee=1 \Leftrightarrow e^1=e
\end{aligned}
\end{equation*}

\begin{equation*}
%\begin{aligned}
\log_5 (\log_2 x) =1 \Rightarrow \log_2x=5 \Rightarrow x=2^5=32
%\end{aligned}
\end{equation*}

\end{comment}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newpage 
\item %第5题
设 $\alpha_1, \alpha_2\in \mathbb{R}^n$ 是两个向量，证明向量组 $\alpha_1+\alpha_2, \, \alpha_1+2\alpha_2, \, \alpha_1+3\alpha_2$ 一定线性相关。

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 试卷留空位
\ifnum\showsolution=0
\vspace{5cm}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%第5题解答
\ifnum\showsolution=1

{\color{red}解答：
\begin{enumerate}[label={\arabic*.}]
\item  根据线性相关的定义，要证明向量方程
$$ (\alpha_1+\alpha_2)x_1 +(\alpha_1+2\alpha_2)x_2 + (\alpha_1+3\alpha_2)x_3=\theta$$
有非零解，其中 $\theta$ 是零向量。

\item  合并同类项，可得
$$ (x_1+x_2+x_3) \alpha_1+ (x_1+2x_2+3x_3)\alpha_2=\theta. $$

\item  令两个向量的系数都等于零，有
\begin{equation*}
\left\{
\begin{aligned}
x_1+x_2+x_3 & = 0, \\
x_1+2x_2+3x_3 & = 0. 
\end{aligned}
\right. 
\end{equation*}

\item  因为是齐次线性方程组，且方程个数小于未知数个数，所以一定有非零解。

\end{enumerate}
}

\vspace{0.2cm}

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newpage 
\item %第6题
设下述矩阵的行向量组线性无关， 
\begin{equation*}
A = \begin{pmatrix}
a_1 & a_2 & a_3 & a_4 \\  
b_1 & b_2 & b_3 & b_4 \\  
c_1 & c_2 & c_3 & c_4 \\  
\end{pmatrix}.
\end{equation*}
从向量组线性无关的定义出发，证明矩阵$A$的四个3阶子式，至少有一个的值不等于零。 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 试卷留空位
\ifnum\showsolution=0
\vspace{3cm}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%第6题解答
\ifnum\showsolution=1

{\color{red}解答：
\begin{enumerate}[label={\arabic*.}]
%\item  因为行向量组线性无关，所以向量方程
%\begin{equation*}
%\begin{pmatrix}  a_1 \\ a_2 \\ a_3 \\ a_4 \\   \end{pmatrix} x_1 + 
%\begin{pmatrix}  b_1 \\ b_2 \\ b_3 \\ b_4 \\   \end{pmatrix} x_2 + 
%\begin{pmatrix}  c_1 \\ c_2 \\ c_3 \\ c_4 \\   \end{pmatrix} x_3
%=
%\begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \\   \end{pmatrix}
%\end{equation*}
%只有零解 $(x_1,x_2,x_3)=(0,0,0)$. 

\item  经过一次初等行变换，线性无关的行向量组仍然变成线性无关的行向量组。

\item  经过若干次初等行变换，矩阵 $A$ 化为阶梯形矩阵 $B$. 

\item  因为 $3\times 4$阶的阶梯形矩阵 $B$ 的行向量组线性无关，所以它有3个阶梯。

\item  矩阵 $B$ 的这3个阶梯所在的3阶子式是一个上三角行列式，且对角线不等于零，所以值不为零。

\item  值不为零的行列式经过初等行变换仍然是值不为零的行列式。

\item  矩阵 $A$ 的对应的3阶子式的值也不等于零。

\end{enumerate}
}

\vspace{0.2cm}

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%试卷结束
\end{document}





